package org.kd.service.impl;


import java.util.List;
import java.util.Set;

import org.kd.dao.EmpBTODao;
import org.kd.model.DTO.EmpBTO;
import org.kd.service.EmpBTOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class EmpBTOServiceImpl   implements EmpBTOService{

	@Autowired
	EmpBTODao empBTODao;
	@Value("${sys.webPath}")
	String webPath;
	@Override
	public EmpBTO queryById(Integer id) {
		// TODO Auto-generated method stub
		EmpBTO empBTO=empBTODao.queryById(id);
		empBTO.setAvatar(empBTO.getAvatar() == null || "".equals(empBTO.getAvatar().trim()) ? webPath +"/img/1.jpg" : webPath + empBTO.getAvatar());
		return empBTO;
	}
	@Override
	public List<EmpBTO> queryByDeptId(Integer id) {
		// TODO Auto-generated method stub
		return empBTODao.queryByDeptId(id);
	}
	@Override
	public Set<String> queryMenu(Integer id) {
		// TODO Auto-generated method stub
		return   empBTODao.queryMenu(id);
	}
}